#include "convertFromRgbToHsv5.h"

/*
 * Retrieves the minimum of 3 ints.
 */
int minNum(uchar x, uchar y, uchar z) {
	int min =x;
	if (y < min) min = y;
	if (z < min) min = z;
	return min;
}

Result test5() {
	IplImage* img = cvLoadImage("C:\\Documents and Settings\\snirbo\\Desktop\\convertFromRgbToHsv\\schiffer.bmp");
	int* new_data = ConvertFromRgbToHsv(img);
	if (new_data == 0) {
		return printTestResult(5, FAIL);
	} else {
		CompareParams comp[2]={V,S};
		return printTestResult(5, compareResultOfHsv(new_data, comp, 2));
	}
}

#ifdef __TEST5__
int main(int argc, char **argv) {
	if (!test1() || !test2() || !test3() || !test4() || !test5()) {
		cout << "TOTAL TEST FAILED!\n";
		getchar();
		exit(1);
	}
	cout << "TOTAL TEST SUCCEEDED\n";
	getchar();
	return 0;
}
#endif